import { Fenxiao } from './fenxiao-model.js';
var fenxiao = new Fenxiao();
Page({

  data: {

  },
  onLoad: function (options) {
    var user = wx.getStorageSync('userInfo');
    this.setData({ user })
  },
  onShow:function(){
    this.getFrozen();
  },
  //获取冻结收益
  getFrozen:function(){
    var that = this;
    var params ={}
    fenxiao.getFrozen(params, (data) => {
      if(data.status == 1){
        var frozenMoney = data.data
      }else{
        var frozenMoney = 0
      }
      that.setData({
        frozenMoney: frozenMoney
      })
    });
  },
  //跳转到收益明细
  toDetail: function () {
    wx.navigateTo({
      url: 'myorder'
    })
  },

})